<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
     <#assign base=request.contextPath  />
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>WISSC轮滑教培服务网-查询系统</title>
    <link rel="icon" href="${base}/favicon.ico">
    <link rel="stylesheet" type="text/css" href="${base}/frame/layui/css/layui.css"/>
    <script src="${base}/js/jquery/jquery.min.js"></script>
    <script src="${base}/frame/layui/layui.all.js" charset="utf-8"></script>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
    <title></title>
    <style type="text/css">
        .mui-text-centernn{
            text-align: center;
        }
        .mui-text-centernn h2{
            padding: 1.25rem;
            font-weight: 700;
            font-size: 32px;
            font-family: "PingFang SC","Microsoft YaHei","微软雅黑","Microsoft JhengHei","黑体",arial,STHeiti,'\5b8b\4f53';
        }
        .layui-input{
            width: 250px;
        }
        .layui-btn-primary{
            background-color: #e7141a;
            color: white;
        }
        .fontsize{
            font-size: 14px;
            color: rgba(162, 158, 158, 1);
            font-weight: 700;
            margin-top: 10%;
        }
        select{
            width: 300px;
            height: 38px;
            line-height: 1.3;
            line-height: 38px\9;
            border-width: 1px;
            border-style: solid;
            background-color: #fff;
            border-radius: 2px;
        }


    </style>
</head>
<body>
<script>
    //控制跳出ifream框架
    if (window != top)
        top.location.href = location.href;
</script>
<div class="mui-content">

<#--
    <img src="${base}/team/getPhoto?path=${list[1].parameter}" style="width: 100px;height: 100px;">
-->
    <img src="${base}/configure/getPhoto?path=${url}" style="width: 100%;height:100%;">

    <div class="mui-text-centernn">
        <h2>${list[2].parameter}</h2>


    <#--管理员-->
        <div>
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input lay-verify="required" autocomplete="off" id="username" class="layui-input" placeholder="输入管理员账号" type="text">
                </div>
            </div><br><br>
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input lay-verify="required" autocomplete="off" id="password" class="layui-input" placeholder="输入管理员密码" type="password">
                </div>
            </div>
            <br><br>
            <button class="layui-btn layui-btn-primary" id="login" type="button" style="width: 250px;color: white">进 &nbsp;&nbsp;&nbsp;入</button>
        </div>


        <p class="fontsize">${list[0].parameter}</p>
    </div>

</div>
<script>

    //管理员
    $('#login').on('click',function () {
        //判断用户输入的是否为空 为空就提示用户名不能为空
        if($("#username").val()==""){
            layer.msg("用户名不能为空");
            return;
        }
        //判断用户输入的是否为空 为空就提示密码不能为空
        if($("#password").val()==""){
            layer.msg("密码不能为空");
            return;
        }

        $.ajax({
            type:"POST",
            url:"${base}/user/login",
            data:{username: $("#username").val(), password: $("#password").val()},
            success:function (data) {
                if(data){
                    layer.msg("&nbsp;&nbsp;&nbsp;登陆成功....")
                    setTimeout(function(){
                        //登陆成功  返回首页页面
                        window.location.href="${base}/user/index.html";
                    },300)
                }else{
                    layer.msg("&nbsp;&nbsp;&nbsp;登录失败,用户名或密码错误");

                }
            }
        });
    });
    //键盘事件
    $("body").bind("keydown",function(e){
        // 兼容FF和IE和Opera
        var theEvent = e || window.event;
        var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
        if (code == 13) {
            //回车执行查询
            $("#login").click();
        }
    });



</script>

</body>
</html>

